package urlEncoder;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;

public class Decode {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String a = "sdfdsdh水电费！！！！00000";
        String e = URLEncoder.encode(a, "UTF-8");
        System.out.println(e);
        String f= URLDecoder.decode(e, "UTF-8");//解密
        System.out.println(f);
//        输出解密后的结果：sdfdsdh水电费！！！！00000
    }
}
